﻿using Max.PH4_2104A.Shopping.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2104A.Shopping.IRepository
{
    /// <summary>
    /// 工作单元接口
    /// </summary>
    public interface IUnitOfWork
    {
        /// <summary>
        /// 上下文对象提交到数据库
        /// </summary>
        /// <returns></returns>
        int SaveChanges();

        /// <summary>
        /// 获取内存中的上下文对象（用它来开启事务）
        /// </summary>
        /// <returns></returns>
        MyDbContext GetContext();

    }
}
